package com.soft2018;

//基类/父类 Pet
public class Pet {

    //TODO: 所有字段
    private String name;
    private int age;
    private String kind;
    private String color;

    //TODO: 取值器赋值器

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    //TODO: 构造器/构造方法、函数
    public Pet(){}
    public Pet(String name,int age,String color)
    {
        this.name=name;
        this.age= age;
        this.color = color;
    }
    public Pet(String name,int age,String color,String kind)
    {
        this.name=name;
        this.age= age;
        this.color = color;
        this.kind = kind;
    }

    //TODO: 操作方法

    public void print(){
        System.out.println("这是名为："+this.name+
                ","+this.age+"岁，"+
                this.color+"的"+
                this.kind);
    }
}
